<?php include 'common/admin/header.phtml';?>
<script src="/ckeditor/ckeditor.js"></script>
<script src="/ckeditor/adapters/jquery.js"></script>
<script>
(function($){
	$(document).ready(function(){
	$('.content').ckeditor();
})
})(jQuery)
</script>

<form name="addArticle" id="addArticle" method="POST" class="form-horizontal">
	<div class="form-group">
		<label class="control-label col-sm-2">标题</label>
		<div class="col-sm-10">
			<input type="text" name="title" id="title" required placeholder="请输入文章标题" class="form-control" value="<?php echo $row['title'];?>">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-sm-2">文章分类</label>
		<div class="col-sm-10">
			<select name="cid" id="cid" class="form-control" required>
				<option value="">请选择分类</option>
				<?php foreach($categoryList as $k =>$v){?>
				<option value="<?php echo $v['id'];?>" <?php if($row['cid'] == $v['id']){echo "selected";}?>><?php echo $v['name'];?></option>
				<?php }?>
			</select>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-sm-2">文章内容</label>
		<div class="col-sm-10">
			<textarea name="content" id="content" rows="3" class="content" required placeholder="请输入文章内容"><?php echo $row['content'];?></textarea>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-10 col-sm-offset-2">
			<button class="btn btn-primary">提交<button>
		</div>
	</div>
</form>
<?php include 'common/admin/footer.phtml';?>
